var uploadFile = {
	//上传图片
	upload: function(callBack){
		var upload=new AjaxUpload('#upload_local', {  
		    action: SystemConfig.baseServiceUrl+"upload/image",  //url
		    name:'imageFile',
		    autoSubmit:false,
		    onSubmit: function (file, ext) {   //上传时事件
				$('#upload_local').text("上传中...");
	   			$("body").modelHanding(true);
		    },  
		    hoverClass:'upload_batch',
		    onChange: function (file, ext) {  
		        if(!Validation.isImageFile(file)){
					alert("请选择图片文件");
					return;
		        }else{
					upload.submit();
		        }
		    },  
		    success: function (data) {
		    	$('#upload_local').text("从本地相册选取");
		    	callBack(data);
		    },
		    exception: function (data) {
		    	$.closeHanding();//关闭遮罩模态
		    	if(!SystemUtil.isNull(data)){
		    		alert(data.responseStatus.message);	    		
		    	}
		    	$('#upload_local').text("从本地相册选取");
		    }
	  });  
	}
};
$(function(){
	uploadFile.upload();
});
